'use strict';

const { BOOLEAN } = require('sequelize');

module.exports = app => {
  const { STRING, CHAR, JSON } = app.Sequelize; // 获取数据类型
  const ConfigTemplate = app.modelmysql.define('businesstemplate',
    {
      id: {
        type: CHAR(27),
        primaryKey: true,
      },
      name: { type: STRING },
      configlist: { type: STRING },
      memo: { type: STRING },
      state: { type: BOOLEAN },
      content: { type: JSON },
      tid: { type: CHAR(27) },
    }
  );
  return ConfigTemplate;
};
